=link_to "Ended Campaigns", ended_admin_campaigns_url

%h1 List campaigns
%table
  %tr
    %th Name
    %th Owner
    %th Start Date
    %th End Date
    %th Is active
    %th Is default 
     
    %th Operations 
  
  -for campaign in @campaigns
    %tr
      %td= link_to campaign.name, admin_campaign_path(campaign)
      %td= campaign.owner.full_name
      %td= campaign.start_date
      %td= campaign.end_date
      %td= campaign.active?
      %td= campaign.is_default    
      %td
        =link_to "Remove", [:admin,campaign], :method=>:delete, :confirm=>"Are you sure you want to delete campaign #{campaign.name}"
        
  
=link_to "New campaign", new_admin_campaign_url

